<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page import="constants.StringConstants" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
function checkSession(){
	if (document.getElementById("admin").value == "") {
		window.location = "admin-login.html";
	}
}
</script>
<title>Website Management</title>
</head>
<body onload="checkSession()">
	<input id="admin" type="hidden" value="${sessionScope.ADMIN_USERNAME}"/>
	<span style="float:right">
		Hi, <strong>${sessionScope.ADMIN_USERNAME}</strong>-
		<a href="/XMLProject/AccountServlet?action=<%=StringConstants.LOGOUT%>">Logout</a>
	</span>
	<h2>Website Management</h2>
	<a href="/XMLProject/DietServlet">Manage Diet</a><br/>
	<a href="/XMLProject/RecipeServlet">Manage Recipe</a><br/>
	<a href="/XMLProject/MenuServlet">Manage Menu</a><br/>
	<a href="/XMLProject/DishServlet">Manage Dish</a><br/>
	<a href="/XMLProject/FoodGroupServlet">Manage FoodGroup</a><br/>
	<a href="/XMLProject/FoodServlet">Manage Food</a><br/>
	<a href="/XMLProject/CookingServlet">Manage Cooking</a><br/><br/>
	<a href="/XMLProject/GenerateServlet">Update Source for System</a>
	<c:if test="${GENERATE_STATUS}">
		<strong><font color="green">Success!</font></strong>
	</c:if>
</body>
</html>